<div class="panel panel-default" ng-controller="RtOrderCtrl">
	<div class="panel-heading">城际约租 / 订单列表</div>
	<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
	<div class="row wrapper m-n">
		<form class="bs-example form-horizontal ng-pristine ng-valid">
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.orderNo" class="form-control" placeholder="订单号">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.orderDetail__contactName" class="form-control" placeholder="联系人姓名">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.orderDetail__contactPhone" class="form-control" placeholder="联系人手机号">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<div class="input-group">
						<ui-select ng-model="statusList.selected" theme="bootstrap">
							<ui-select-match placeholder="订单状态">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="status in statusList | propsFilter: {name: $select.search}">
								<span ng-bind-html=" status.name| highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
						<span class="input-group-btn">
							<button ng-click="statusList.selected = undefined"
								class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
						</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.orderDetail__driver" class="form-control" placeholder="司机姓名">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.orderDetail__driverPhone" class="form-control" placeholder="司机手机号">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.orderDetail__startCity" class="form-control" placeholder="始发城市">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.orderDetail__terminalCity" class="form-control" placeholder="目的城市">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.orderDetail__vehicle" class="form-control" placeholder="车牌号">
				</div>
			</div>
			<div class="form-group col-md-3" ng-controller="DatepickerDemoCtrl">
				<div class="col-md-11">
					<div class="input-group">
						<input type="text" class="form-control" datepicker-popup="{{format}}" is-open="opened" ng-model="timeRange.startTime" datepicker-options="dateOptions"
							close-text="Close" placeholder="订单开始时间" readOnly /> <span class="input-group-btn">
							<button type="button" class="btn btn-default"
								ng-click="open($event)">
								<i class="glyphicon glyphicon-calendar"></i>
							</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-3" ng-controller="DatepickerDemoCtrl">
				<div class="col-md-11">
					<div class="input-group">
						<input type="text" class="form-control" datepicker-popup="{{format}}" is-open="opened" ng-model="timeRange.endTime" datepicker-options="dateOptions"
							close-text="Close" placeholder="订单结束时间" readOnly /> <span class="input-group-btn">
							<button type="button" class="btn btn-default"
								ng-click="open($event)">
								<i class="glyphicon glyphicon-calendar"></i>
							</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-3" >
				<div class="col-md-4">
					  <button type="button" class="btn btn-info" ng-click="query()">查询</button>
			    </div>	
			    <div class="col-md-4">	   
					  <button type="button" class="btn btn-info" ng-click="total()">订单汇总</button>					
				</div>
			</div>				
		</form>
	</div>
	<p ng-show="flag" class="m-l-xl">
		当前总共：{{totalCount | defaultValue: 0}}条数据 &nbsp;
		订单总金额：{{orderTotal | number:2 | defaultValue: 0.00}}元 &nbsp;
		应付金额：{{orderPaymentTotal | number:2 | defaultValue: 0.00}}元 &nbsp;
		申请退款金额：{{orderRefundToatal | number:2 | defaultValue: 0.00}}元 &nbsp;
		保险金额：{{insurancesToatal | number:2 | defaultValue: 0.00}}元 &nbsp;
		票数：{{tickets | defaultValue: 0}}张
	</p>
	<div class="table-responsive">
		<table class="table table-striped b-t b-light">
			<thead>
				<tr>
					<th style="width: 10px;"></th>
					<th>订单编号</th>
					<th>联系人</th>
					<th>联系人手机号</th>
					<th>订单总金额</th>
					<th>应付金额</th>
					<th>订单生成时间</th>
					<th>状态</th>
					<th>
						<a href tooltip="excel导出" has-authority="RENT_ORDER_EXPORT">
							<i class="fa fa-download" ng-click="exportExcel()"></i>
						</a>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="order in dataList">
					<td></td>
					<td>{{order.orderNo}}</td>
					<td>{{order.contactName}}</td>
					<td>{{order.contactPhone}}</td>
					<td>{{order.totalPrice |number:2}}</td>
					<td>{{order.payablePrice |number:2}}</td>
					<td>{{order.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
					<td>{{order.status | orderFilter}}</td>
					<td>
						<div class="list-icon">
<!-- 							<a href tooltip="手动退款" has-authority="RENT_ORDER_UPDATE" ng-if="order.status==9" ui-sref="app.rent.detail({orderId: order.id,status: order.status})"
								target="_blank"><i class="fa  fa-edit" ></i></a>
							<a href tooltip="退票" has-authority="RENT_ORDER_REFUND" ng-if="order.status==3" ui-sref="app.rent.detail({orderId: order.id,status: order.status})"
								target="_blank"><i class="fa fa-pencil fa-fw" ></i></a> -->
							<a href tooltip="详情" ui-sref="app.rent.detail({orderId: order.id,status: order.status})" target="_blank"><i class="fa icon-info" ></i></a>
							<a href tooltip="作废" has-authority="RENT_ORDER_DEL" ng-if="order.status==4||order.status==5||order.status==6||order.status==8"><i class="fa fa-trash-o" ng-click="del('sm',order,'delete')"></i></a>
						</div>
					</td>
				</tr>
				<tr ng-show="dataList.length==0">
					<td colspan="9" style="text-align: center;">暂无订单信息</td>
				</tr>
			</tbody>
		</table>
	</div>
	<page-footer/>
</div>